package com.biu.billiards.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.biu.billiards.model.bo.DeviceBO;
import com.biu.billiards.model.entity.Device;
import com.baomidou.mybatisplus.extension.service.IService;
import com.biu.billiards.model.vo.device.AddDeviceVo;
import com.biu.billiards.model.vo.device.GetDeviceVo;
import com.biu.billiards.model.vo.device.UpdateDeviceVO;
import com.biu.billiards.model.vo.mqtt.OpenDeviceVo;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xue
 * @since 2023-10-25
 */
public interface IDeviceService extends IService<Device> {

    List<Device> getTaskDeviceList(Boolean open,Integer shopId);

    List<Device> getRuleDeviceList(Boolean open,Integer shopId);

   // Boolean openStatus(List<OpenDeviceVo> openDeviceVoList);

    List<Device> getDeviceList();


    void taskOpen(Boolean open,Integer shopIp);


    //打开空调
    void autoOpenVrv(Integer shopIp);

    //关闭空调
    void autoCloseVrv(Integer shopIp);


    Boolean openDevices(List<OpenDeviceVo> openDeviceVoList,String deviceId);


    void openVrv(Boolean open,Integer shopId);

    void openFan(Integer open);

    void openDoor(OpenDeviceVo openDeviceVo);

    IPage<DeviceBO> getDevicePage(GetDeviceVo getDeviceVo);

    Boolean updateDevice(UpdateDeviceVO updateDeviceVO);


    Boolean addDevice(AddDeviceVo addDeviceVo);

    Boolean deleteDevice(Integer deviceId);

}
